10. Exercise: Add Colors and Fonts!

Add Colors and Fonts

In this exercise, you'll add colors and fonts to your Colors and Fonts activity.

Colors

Here are the colors you should use in your color scheme:

Color Value
colorPrimary #673AB7
colorPrimaryDark #512DA8
colorAccent #FF9100
colorPrimaryLight #D1C4E9

Exercise Code

Exercise: T12.01-Exercise-ColorsAndFonts

Follow the TODOs to update the colors used in the Color and Fonts activity:

SOLUTION:
  • Change the color scheme so that the correct colors are used for colorPrimary, colorPrimaryDark and colorAccent
  • Create a new color "colorPrimaryLight" and set it equal to #D1C4E9
  • Add a new view to the layout color_font_activity.xml file to display the newly created primary light color

Fonts

Check out this link and then do the following steps.

Complete the following tasks

SOLUTION:
  • Using the link above, check out the variety in sizes, styles, and font-families for Roboto
  • Create a new TextView with size 16sp and font-family sans-serif-smallcaps